home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Graphics Plus
/
Graphics Plus.iso
/
msdos
/
viewers
/
tgif11
/
tgif11.doc
< prev
next >
Wrap
Text File
|
1990-04-19
|
7KB
|
140 lines
--------------------- TGIF Version 1.1 (Beta) ---------------------
GIF File Utility.
Gif is copyright of CompuServe, Inc.
TGIF (for Thank God It's Friday, I wrote this code on weekends)
Version History:
Version 1.0 released April 16, 1990
Version 1.1 released
Fixes bug in the save program which caused one in every
128 GIF files saved to be terminated improperly. This new save
program has not been observed to fail.
Fixed bug in histogram routine so that the gray scale is
expanded to the full range of black to white.
Fixed Bug in Gray Conversion routine which caused all
pictures to be weighted 100% blue. Added code to adjust
red/green/blue weighting for gray conversion.
Tgif allows you to view GIF pictures using a VGA monitor. However,
picture viewing is not what TGIF is intended to be used for. TGIF is
a graphics utility which allows you to:
o Cut a portion of a GIF picture.
o Convert a picture to a "Black and White" grayscale image.
o Perform image sharpening.
TGIF has a very simple interface. My original (unreleased) version
of TGIF was very fancy, sort of like one of the better GIF file
viewers. However, because of the requirement that the picture be
retained in memory while operations were being performed on it, very
large GIF files could not be loaded due to the large size of the
program itself. The nice interface was sacrificed for greater
utility. I also changed languages, finding that Assembler was faster
and resulted in much more compact code.
TGIF is started by typing TGIF at the Dos Prompt. This does not
erase the screen so that you can do a directory first to identify
the file you wish to work on. TGIF then request the name of the GIF
file. After this is done, the TGIF main menu is displayed.
TGIF main Menu:
1) Show GIF Characteristics
2) Display the Current Picture
3) Load another picture
4) Cut a portion of the picture
5) Convert to Gray Scale
6) Save the Picture
7) Quit the program
Function 1 shows all of the information about the picture that is
available in the Screen Descriptor and Image Descriptor.
Function 2 only works if you have a VGA monitor. In a later version,
you will be able to display the picture on an EGA monitor, also.
Function 3 frees the memory and loads another picture. This has
little added value, in my opinion, but the added code was not great
either. I plan on using it later.
Function 4 Cuts a portion of the current picture to make a smaller
picture. VGA is required, as in Function 2. A mouse is optional and
is very useful. If the mouse is not used, then your cursor is this
tiny little dot that moves SLOWLY across the screen. The cursor is
moved with the arrow keys on the keypad . If you have a Microsoft (tm)
or Mouse Systems (tm) mouse then you can move rapidly across the
picture to the area that you wish to cut. If your picture is bigger
than the screen, move the mouse to the edge of the screen in the
direction in which you wish to go. A new area of the picture will
then be displayed.
NOTE: I have observed a bug in this Function. I developed this
program on a DTK XT-clone with a no-brand-name VGA card from JDR
Microdevices, and a Genius GM-6X mouse. The program worked fine.
I then tested it on a Compact 286 with a Orchid VGA card and
found that my (MicroSoft) mouse travel was severely limited! I
put a fix in BUT now it seems that my mouse cursor jumps around
SOMETIMES. I haven't be able to isolate the cause due to the
nature of the CodeView debugger.
Function 5 converts the picture to Gray Scale. The initial weighting
of Red, Green and Blue is 5 parts red, 9 parts green and 2 parts
blue. I choose this color weighting as the initial values because
it is similar to the gray conversion performed by the VGA bios.
The color weighting can be adjusted by using the arrow keys on
the keypad. Right Arrow incresses a color (and decreases the
color below it). Left Arrow decreases a color (and increases the
color above it). The up and down arrows change the current
color(s) being edited.
Function 6 Saves the picture. This saves the picture that you have
in memory as a GIF file. It is very slow, and this is after I
speeded it up some! It has a bar graph to show you how much of the
saving is done, in case you are one of those people who think that
their computer has quietly crashed and didn't bother to tell you
that it has become confused.
Function 7 Quits, and returns to the Dos prompt.
Once you have converted the picture to a Gray image, (Function 5)
you can get the following functions from the Aux menu.
Function 8 Sharpens the picture by LaPlacian subtraction. Sometimes
this makes the picture a little better, sometimes it'll bring out
more detail, and sometimes you'll wish that you hadn't done it.
Function 9 Doesn't work yet. It takes the picture and converts it to
the frequency domain using a Fast Fourier Transform. From there,
it's going to get complicated, as you can do spacial filtering.
Function A Counts the occurrences and draws a weighted histogram of
the picture. From the Histogram you get a mini-menu, 1 will return
you to the Main+Aux menu. 2 will expand the gray scale so that the
darkest gray in the picture is black, and the lightest gray is white.
Function B and C doesn't work yet either.
In the future, TGIF will allow you to:
o Do Histograms of COLOR pictures.
o Save pictures in another format.
o Sharpen COLOR pictures. (Tough one.)
o View and cut in EGA mode.
o Work on Multiple image GIFs
o Create Multiple image GIFs from single/multiple image
GIF files.
o Save files as interlaced GIFs (I hate interlacing!)
I would like to hear from anyone with a VGA compatibility problem
or any other problem that I haven't mentioned. For example, to
draw the picture, I directly access the memory area at segment
A000 using MOV commands. This is not stictly the VGA standard. I
would be grateful to hear if this method does not work for
everyone.
Steve La Joie
Amature Programer
GEnie Mail S.Lajoie
Prostar - FRESNO